package com.zhang.hadoop.spring.service;

import com.alibaba.fastjson.JSONObject;
import com.zhang.hadoop.spring.bean.Action;
import com.zhang.hadoop.spring.bean.ActionResult;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhang yufei
 * @date 2022/4/14 10:37 上午
 **/
@Service
public class MockTest {

    public Action getData(String param){
        Map<String,Object> data=new HashMap<>();
        data.put("stringTest","string");
        data.put("integerTest",1);
        data.put("intTest",2);
        Action action=new Action();
        action.setInputData(JSONObject.toJSONString(data));
        return action;
    }

    public void sendResult(ActionResult actionResult){
        System.out.println("发送成功");
    }

}
